﻿using System;
using System.Runtime.InteropServices;
using System.Text;

namespace InfiniTec.Net
{
	internal enum QueryOptions
	{
	
		/// DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE -> 0x00000001
		ACCEPT_TRUNCATED_RESPONSE = 1,

		/// DNS_QUERY_BYPASS_CACHE -> 0x00000008
		BYPASS_CACHE = 8,

		/// DNS_QUERY_CACHE_ONLY -> DNS_QUERY_NO_WIRE_QUERY
		CACHE_ONLY = 0x00000010,

		/// DNS_QUERY_DONT_RESET_TTL_VALUES -> 0x00100000
		DONT_RESET_TTL_VALUES = 1048576,

		/// DNS_QUERY_NO_HOSTS_FILE -> 0x00000040
		NO_HOSTS_FILE = 64,

		/// DNS_QUERY_NO_LOCAL_NAME -> 0x00000020
		NO_LOCAL_NAME = 32,

		/// DNS_QUERY_NO_NETBT -> 0x00000080
		NO_NETBT = 128,

		/// DNS_QUERY_NO_RECURSION -> 0x00000004
		NO_RECURSION = 4,

		/// DNS_QUERY_NO_WIRE_QUERY -> 0x00000010
		NO_WIRE_QUERY = 16,

		/// DNS_QUERY_RESERVED -> 0xff000000
		RESERVED = -16777216,

		/// DNS_QUERY_RETURN_MESSAGE -> 0x00000200
		RETURN_MESSAGE = 512,

		/// DNS_QUERY_STANDARD -> 0x00000000
		STANDARD = 0,

		/// DNS_QUERY_TREAT_AS_FQDN -> 0x00001000
		TREAT_AS_FQDN = 4096,

		/// DNS_QUERY_USE_TCP_ONLY -> 0x00000002
		USE_TCP_ONLY = 2,

		/// DNS_QUERY_WIRE_ONLY -> 0x00000100
		WIRE_ONLY = 256,

	
	}
	internal enum QueryType: ushort
	{
	/// DNS_TYPE_A -> 0x0001
		A = 1,

		/// DNS_TYPE_A6 -> 0x0026
		A6 = 38,

		/// DNS_TYPE_AAAA -> 0x001c
		AAAA = 28,

		/// DNS_TYPE_ADDRS -> 0x00f8
		ADDRS = 248,

		/// DNS_TYPE_AFSDB -> 0x0012
		AFSDB = 18,

		/// DNS_TYPE_ALL -> 0x00ff
		ALL = 255,

		/// DNS_TYPE_ANY -> 0x00ff
		ANY = 255,

		/// DNS_TYPE_ATMA -> 0x0022
		ATMA = 34,

		/// DNS_TYPE_AXFR -> 0x00fc
		AXFR = 252,

		/// DNS_TYPE_CERT -> 0x0025
		CERT = 37,

		/// DNS_TYPE_CNAME -> 0x0005
		CNAME = 5,

		/// DNS_TYPE_DNAME -> 0x0027
		DNAME = 39,

		/// DNS_TYPE_EID -> 0x001f
		EID = 31,

		/// DNS_TYPE_GID -> 0x0066
		GID = 102,

		/// DNS_TYPE_GPOS -> 0x001b
		GPOS = 27,

		/// DNS_TYPE_HINFO -> 0x000d
		HINFO = 13,

		/// DNS_TYPE_ISDN -> 0x0014
		ISDN = 20,

		/// DNS_TYPE_IXFR -> 0x00fb
		IXFR = 251,

		/// DNS_TYPE_KEY -> 0x0019
		KEY = 25,

		/// DNS_TYPE_KX -> 0x0024
		KX = 36,

		/// DNS_TYPE_LOC -> 0x001d
		LOC = 29,

		/// DNS_TYPE_MAILA -> 0x00fe
		MAILA = 254,

		/// DNS_TYPE_MAILB -> 0x00fd
		MAILB = 253,

		/// DNS_TYPE_MB -> 0x0007
		MB = 7,

		/// DNS_TYPE_MD -> 0x0003
		MD = 3,

		/// DNS_TYPE_MF -> 0x0004
		MF = 4,

		/// DNS_TYPE_MG -> 0x0008
		MG = 8,

		/// DNS_TYPE_MINFO -> 0x000e
		MINFO = 14,

		/// DNS_TYPE_MR -> 0x0009
		MR = 9,

		/// DNS_TYPE_MX -> 0x000f
		MX = 15,

		/// DNS_TYPE_NAPTR -> 0x0023
		NAPTR = 35,

		/// DNS_TYPE_NIMLOC -> 0x0020
		NIMLOC = 32,

		/// DNS_TYPE_NS -> 0x0002
		NS = 2,

		/// DNS_TYPE_NSAP -> 0x0016
		NSAP = 22,

		/// DNS_TYPE_NSAPPTR -> 0x0017
		NSAPPTR = 23,

		/// DNS_TYPE_NULL -> 0x000a
		NULL = 10,

		/// DNS_TYPE_NXT -> 0x001e
		NXT = 30,

		/// DNS_TYPE_OPT -> 0x0029
		OPT = 41,

		/// DNS_TYPE_PTR -> 0x000c
		PTR = 12,

		/// DNS_TYPE_PX -> 0x001a
		PX = 26,

		/// DNS_TYPE_RP -> 0x0011
		RP = 17,

		/// DNS_TYPE_RT -> 0x0015
		RT = 21,

		/// DNS_TYPE_SIG -> 0x0018
		SIG = 24,

		/// DNS_TYPE_SINK -> 0x0028
		SINK = 40,

		/// DNS_TYPE_SOA -> 0x0006
		SOA = 6,

		/// DNS_TYPE_SRV -> 0x0021
		SRV = 33,

		/// DNS_TYPE_TEXT -> 0x0010
		TEXT = 16,

		/// DNS_TYPE_TKEY -> 0x00f9
		TKEY = 249,

		/// DNS_TYPE_TSIG -> 0x00fa
		TSIG = 250,

		/// DNS_TYPE_UID -> 0x0065
		UID = 101,

		/// DNS_TYPE_UINFO -> 0x0064
		UINFO = 100,

		/// DNS_TYPE_UNSPEC -> 0x0067
		UNSPEC = 103,

		/// DNS_TYPE_WINS -> 0xff01
		WINS = 65281,

		/// DNS_TYPE_WINSR -> 0xff02
		WINSR = 65282,

		/// DNS_TYPE_WKS -> 0x000b
		WKS = 11,

		/// DNS_TYPE_X25 -> 0x0013
		X25 = 19,

		/// DNS_TYPE_ZERO -> 0x0000
		ZERO = 0,
	}
	internal class NativeConstants
	{
		/// _WINDNS_INCLUDED_ -> 
		/// Error generating expression: Value cannot be null.
		///Parameter name: node
		internal const string _WINDNS_INCLUDED_ = "";

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_ANSWER_FROM_QUESTION -> "(_pQuestion_) ( (PCHAR)( (PDNS_QUESTION)(_pQuestion_) + 1 ) )"
		internal const string DNS_ANSWER_FROM_QUESTION = "(_pQuestion_) ( (PCHAR)( (PDNS_QUESTION)(_pQuestion_) + 1 ) )";

		/// DNS_ATMA_AESA_ADDR_LENGTH -> (20)
		internal const int DNS_ATMA_AESA_ADDR_LENGTH = 20;

		/// DNS_ATMA_FORMAT_AESA -> 2
		internal const int DNS_ATMA_FORMAT_AESA = 2;

		/// DNS_ATMA_FORMAT_E164 -> 1
		internal const int DNS_ATMA_FORMAT_E164 = 1;

		/// DNS_ATMA_MAX_ADDR_LENGTH -> (20)
		internal const int DNS_ATMA_MAX_ADDR_LENGTH = 20;

		/// DNS_ATMA_MAX_RECORD_LENGTH -> (DNS_ATMA_MAX_ADDR_LENGTH+1)
		internal const int DNS_ATMA_MAX_RECORD_LENGTH = (DNS_ATMA_MAX_ADDR_LENGTH + 1);

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_BYTE_FLIP_HEADER_COUNTS -> "(pHeader) {                                   
		///            PDNS_HEADER _head = (pHeader);  
		///            INLINE_HTONS(_head->Xid,            _head->Xid             ); 
		///            INLINE_HTONS(_head->QuestionCount,  _head->QuestionCount   ); 
		///            INLINE_HTONS(_head->AnswerCount,    _head->AnswerCount     ); 
		///            INLINE_HTONS(_head->NameServerCount,_head->NameServerCount ); 
		///            INLINE_HTONS(_head->AdditionalCount,_head->AdditionalCount ); 
		///        }"
		internal const string DNS_BYTE_FLIP_HEADER_COUNTS =
			@"(pHeader) {                                   
            PDNS_HEADER _head = (pHeader);  
            INLINE_HTONS(_head->Xid,            _head->Xid             ); 
            INLINE_HTONS(_head->QuestionCount,  _head->QuestionCount   ); 
            INLINE_HTONS(_head->AnswerCount,    _head->AnswerCount     ); 
            INLINE_HTONS(_head->NameServerCount,_head->NameServerCount ); 
            INLINE_HTONS(_head->AdditionalCount,_head->AdditionalCount ); 
        }";

		/// DNS_CLASS_ALL -> 0x00ff
		internal const int DNS_CLASS_ALL = 255;

		/// DNS_CLASS_ANY -> 0x00ff
		internal const int DNS_CLASS_ANY = 255;

		/// DNS_CLASS_CHAOS -> 0x0003
		internal const int DNS_CLASS_CHAOS = 3;

		/// DNS_CLASS_CSNET -> 0x0002
		internal const int DNS_CLASS_CSNET = 2;

		/// DNS_CLASS_HESIOD -> 0x0004
		internal const int DNS_CLASS_HESIOD = 4;

		/// DNS_CLASS_INTERNET -> 0x0001
		internal const int DNS_CLASS_INTERNET = 1;

		/// DNS_CLASS_NONE -> 0x00fe
		internal const int DNS_CLASS_NONE = 254;

		/// DNS_COMPRESSED_QUESTION_NAME -> (0xC00C)
		internal const int DNS_COMPRESSED_QUESTION_NAME = 49164;

		/// DNS_CONFIG_FLAG_ALLOC -> (0x00000001)
		internal const int DNS_CONFIG_FLAG_ALLOC = 1;

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_HEADER_FLAGS -> "(pHead) ( *((PWORD)(pHead)+1) )"
		internal const string DNS_HEADER_FLAGS = "(pHead) ( *((PWORD)(pHead)+1) )";

		/// DNS_IP4_REVERSE_DOMAIN_STRING -> DNS_IP4_REVERSE_DOMAIN_STRING_W
		internal const string DNS_IP4_REVERSE_DOMAIN_STRING = DNS_IP4_REVERSE_DOMAIN_STRING_W;

		/// DNS_IP4_REVERSE_DOMAIN_STRING_A -> ("in-addr.arpa.")
		internal const string DNS_IP4_REVERSE_DOMAIN_STRING_A = "in-addr.arpa.";

		/// DNS_IP4_REVERSE_DOMAIN_STRING_W -> (L"in-addr.arpa.")
		internal const string DNS_IP4_REVERSE_DOMAIN_STRING_W = "in-addr.arpa.";

		/// DNS_IP6_REVERSE_DOMAIN_STRING -> DNS_IP6_REVERSE_DOMAIN_STRING_W
		internal const string DNS_IP6_REVERSE_DOMAIN_STRING = DNS_IP6_REVERSE_DOMAIN_STRING_W;


		/// DNS_IP6_REVERSE_DOMAIN_STRING_A -> ("ip6.arpa.")
		internal const string DNS_IP6_REVERSE_DOMAIN_STRING_A = "ip6.arpa.";

		/// DNS_IP6_REVERSE_DOMAIN_STRING_W -> (L"ip6.arpa.")
		internal const string DNS_IP6_REVERSE_DOMAIN_STRING_W = "ip6.arpa.";

		/// DNS_MAX_IP4_REVERSE_NAME_LENGTH -> (IP4_ADDRESS_STRING_LENGTH+1+sizeof(DNS_IP4_REVERSE_DOMAIN_STRING_A))
		/// Error generating expression: Error generating function call.  Operation not implemented
		internal const string DNS_MAX_IP4_REVERSE_NAME_LENGTH = "(IP4_ADDRESS_STRING_LENGTH+1+sizeof(DNS_IP4_REVERSE_DOMAIN_STRING_A))";

		/// DNS_MAX_IP6_REVERSE_NAME_LENGTH -> (64+sizeof(DNS_IP6_REVERSE_DOMAIN_STRING_A))
		/// Error generating expression: Error generating function call.  Operation not implemented
		internal const string DNS_MAX_IP6_REVERSE_NAME_LENGTH = "(64+sizeof(DNS_IP6_REVERSE_DOMAIN_STRING_A))";

		/// DNS_MAX_LABEL_BUFFER_LENGTH -> (64)
		internal const int DNS_MAX_LABEL_BUFFER_LENGTH = 64;

		/// DNS_MAX_LABEL_LENGTH -> (63)
		internal const int DNS_MAX_LABEL_LENGTH = 63;

		/// DNS_MAX_NAME_BUFFER_LENGTH -> (256)
		internal const int DNS_MAX_NAME_BUFFER_LENGTH = 256;

		/// DNS_MAX_NAME_LENGTH -> (255)
		internal const int DNS_MAX_NAME_LENGTH = 255;


		/// DNS_MAX_TEXT_STRING_LENGTH -> (255)
		internal const int DNS_MAX_TEXT_STRING_LENGTH = 255;

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_NULL_RECORD_LENGTH -> "(ByteCount) (FIELD_OFFSET(DNS_NULL_DATA, Data) + (ByteCount))"
		internal const string DNS_NULL_RECORD_LENGTH = "(ByteCount) (FIELD_OFFSET(DNS_NULL_DATA, Data) + (ByteCount))";

		/// DNS_OFFSET_TO_QUESTION_NAME -> sizeof(DNS_HEADER)
		/// Error generating expression: Error generating function call.  Operation not implemented
		internal const string DNS_OFFSET_TO_QUESTION_NAME = "sizeof(DNS_HEADER)";

		/// DNS_OPCODE_IQUERY -> 1
		internal const int DNS_OPCODE_IQUERY = 1;

		/// DNS_OPCODE_NOTIFY -> 4
		internal const int DNS_OPCODE_NOTIFY = 4;

		/// DNS_OPCODE_QUERY -> 0
		internal const int DNS_OPCODE_QUERY = 0;

		/// DNS_OPCODE_SERVER_STATUS -> 2
		internal const int DNS_OPCODE_SERVER_STATUS = 2;

		/// DNS_OPCODE_UNKNOWN -> 3
		internal const int DNS_OPCODE_UNKNOWN = 3;

		/// DNS_OPCODE_UPDATE -> 5
		internal const int DNS_OPCODE_UPDATE = 5;

		/// DNS_PORT_HOST_ORDER -> (0x0035)
		internal const int DNS_PORT_HOST_ORDER = 53;

		/// DNS_PORT_NET_ORDER -> (0x3500)
		internal const int DNS_PORT_NET_ORDER = 13568;
		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_QUESTION_NAME_FROM_HEADER -> "(_pHeader_) ( (PCHAR)( (PDNS_HEADER)(_pHeader_) + 1 ) )"
		internal const string DNS_QUESTION_NAME_FROM_HEADER = "(_pHeader_) ( (PCHAR)( (PDNS_HEADER)(_pHeader_) + 1 ) )";

		/// DNS_RCLASS_ALL -> 0xff00
		internal const int DNS_RCLASS_ALL = 65280;

		/// DNS_RCLASS_ANY -> 0xff00
		internal const int DNS_RCLASS_ANY = 65280;

		/// DNS_RCLASS_CHAOS -> 0x0300
		internal const int DNS_RCLASS_CHAOS = 768;

		/// DNS_RCLASS_CSNET -> 0x0200
		internal const int DNS_RCLASS_CSNET = 512;

		/// DNS_RCLASS_HESIOD -> 0x0400
		internal const int DNS_RCLASS_HESIOD = 1024;

		/// DNS_RCLASS_INTERNET -> 0x0100
		internal const int DNS_RCLASS_INTERNET = 256;

		/// DNS_RCLASS_NONE -> 0xfe00
		internal const int DNS_RCLASS_NONE = 65024;

		/// DNS_RCODE_BADKEY -> 17
		internal const int DNS_RCODE_BADKEY = 17;

		/// DNS_RCODE_BADSIG -> 16
		internal const int DNS_RCODE_BADSIG = 16;

		/// DNS_RCODE_BADTIME -> 18
		internal const int DNS_RCODE_BADTIME = 18;

		/// DNS_RCODE_BADVERS -> 16
		internal const int DNS_RCODE_BADVERS = 16;

		/// DNS_RCODE_FORMAT_ERROR -> DNS_RCODE_FORMERR
		internal const int DNS_RCODE_FORMAT_ERROR = DNS_RCODE_FORMERR;

		/// DNS_RCODE_FORMERR -> 1
		internal const int DNS_RCODE_FORMERR = 1;

		/// DNS_RCODE_MAX -> 15
		internal const int DNS_RCODE_MAX = 15;

		/// DNS_RCODE_NAME_ERROR -> DNS_RCODE_NXDOMAIN
		internal const int DNS_RCODE_NAME_ERROR = DNS_RCODE_NXDOMAIN;

		/// DNS_RCODE_NO_ERROR -> DNS_RCODE_NOERROR
		internal const int DNS_RCODE_NO_ERROR = DNS_RCODE_NOERROR;

		/// DNS_RCODE_NOERROR -> 0
		internal const int DNS_RCODE_NOERROR = 0;

		/// DNS_RCODE_NOT_IMPLEMENTED -> DNS_RCODE_NOTIMPL
		internal const int DNS_RCODE_NOT_IMPLEMENTED = DNS_RCODE_NOTIMPL;

		/// DNS_RCODE_NOTAUTH -> 9
		internal const int DNS_RCODE_NOTAUTH = 9;

		/// DNS_RCODE_NOTIMPL -> 4
		internal const int DNS_RCODE_NOTIMPL = 4;

		/// DNS_RCODE_NOTZONE -> 10
		internal const int DNS_RCODE_NOTZONE = 10;

		/// DNS_RCODE_NXDOMAIN -> 3
		internal const int DNS_RCODE_NXDOMAIN = 3;

		/// DNS_RCODE_NXRRSET -> 8
		internal const int DNS_RCODE_NXRRSET = 8;

		/// DNS_RCODE_REFUSED -> 5
		internal const int DNS_RCODE_REFUSED = 5;

		/// DNS_RCODE_SERVER_FAILURE -> DNS_RCODE_SERVFAIL
		internal const int DNS_RCODE_SERVER_FAILURE = DNS_RCODE_SERVFAIL;

		/// DNS_RCODE_SERVFAIL -> 2
		internal const int DNS_RCODE_SERVFAIL = 2;

		/// DNS_RCODE_YXDOMAIN -> 6
		internal const int DNS_RCODE_YXDOMAIN = 6;

		/// DNS_RCODE_YXRRSET -> 7
		internal const int DNS_RCODE_YXRRSET = 7;

		/// DNS_RECORD_FIXED_SIZE -> FIELD_OFFSET( DNS_RECORD, Data )
		/// Error generating expression: Error generating function call.  Operation not implemented
		internal const string DNS_RECORD_FIXED_SIZE = "FIELD_OFFSET( DNS_RECORD, Data )";

		/// DNS_RFC_MAX_UDP_PACKET_LENGTH -> (512)
		internal const int DNS_RFC_MAX_UDP_PACKET_LENGTH = 512;

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_RRSET_ADD -> "(rrset,pnewRR) {                                       
		///            PDNS_RRSET  _prrset = &(rrset);     
		///            PDNS_RECORD _prrnew = (pnewRR);     
		///            _prrset->pLastRR->pNext = _prrnew;  
		///            _prrset->pLastRR = _prrnew;         
		///        }"
		internal const string DNS_RRSET_ADD =
			@"(rrset,pnewRR) {                                       
            PDNS_RRSET  _prrset = &(rrset);     
            PDNS_RECORD _prrnew = (pnewRR);     
            _prrset->pLastRR->pNext = _prrnew;  
            _prrset->pLastRR = _prrnew;         
        }";

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_RRSET_INIT -> "(rrset) {                                       
		///            PDNS_RRSET  _prrset = &(rrset);     
		///            _prrset->pFirstRR = NULL;           
		///            _prrset->pLastRR = (PDNS_RECORD) &_prrset->pFirstRR; 
		///        }"
		internal const string DNS_RRSET_INIT = "(rrset) {                                       \r\n            PDNS_RRSET  _prrset" +
											 " = &(rrset);     \r\n            _prrset->pFirstRR = NULL;           \r\n           " +
											 " _prrset->pLastRR = (PDNS_RECORD) &_prrset->pFirstRR; \r\n        }";

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_RRSET_TERMINATE -> "(rrset) {                                       
		///            PDNS_RRSET  _prrset = &(rrset);     
		///            _prrset->pLastRR->pNext = NULL;     
		///        }"
		internal const string DNS_RRSET_TERMINATE = "(rrset) {                                       \r\n            PDNS_RRSET  _prrset" +
												  " = &(rrset);     \r\n            _prrset->pLastRR->pNext = NULL;     \r\n        }";


		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_TEXT_RECORD_LENGTH -> "(StringCount) (FIELD_OFFSET(DNS_TXT_DATA, pStringArray) + ((StringCount) * sizeof(PCHAR)))"
		internal const string DNS_TEXT_RECORD_LENGTH = "(StringCount) (FIELD_OFFSET(DNS_TXT_DATA, pStringArray) + ((StringCount) * sizeof" +
													 "(PCHAR)))";

		/// DNS_TKEY_MODE_DIFFIE_HELLMAN -> 2
		internal const int DNS_TKEY_MODE_DIFFIE_HELLMAN = 2;

		/// DNS_TKEY_MODE_GSS -> 3
		internal const int DNS_TKEY_MODE_GSS = 3;

		/// DNS_TKEY_MODE_RESOLVER_ASSIGN -> 4
		internal const int DNS_TKEY_MODE_RESOLVER_ASSIGN = 4;

		/// DNS_TKEY_MODE_SERVER_ASSIGN -> 1
		internal const int DNS_TKEY_MODE_SERVER_ASSIGN = 1;

	

		/// DNS_UPDATE_CACHE_SECURITY_CONTEXT -> 0x00000200
		internal const int DNS_UPDATE_CACHE_SECURITY_CONTEXT = 512;

		/// DNS_UPDATE_FORCE_SECURITY_NEGO -> 0x00000800
		internal const int DNS_UPDATE_FORCE_SECURITY_NEGO = 2048;

		/// DNS_UPDATE_REMOTE_SERVER -> 0x00004000
		internal const int DNS_UPDATE_REMOTE_SERVER = 16384;

		/// DNS_UPDATE_RESERVED -> 0xffff0000
		internal const int DNS_UPDATE_RESERVED = -65536;

		/// DNS_UPDATE_SECURITY_OFF -> 0x00000010
		internal const int DNS_UPDATE_SECURITY_OFF = 16;

		/// DNS_UPDATE_SECURITY_ON -> 0x00000020
		internal const int DNS_UPDATE_SECURITY_ON = 32;

		/// DNS_UPDATE_SECURITY_ONLY -> 0x00000100
		internal const int DNS_UPDATE_SECURITY_ONLY = 256;

		/// DNS_UPDATE_SECURITY_USE_DEFAULT -> 0x00000000
		internal const int DNS_UPDATE_SECURITY_USE_DEFAULT = 0;

		/// DNS_UPDATE_SKIP_NO_UPDATE_ADAPTERS -> 0x00002000
		internal const int DNS_UPDATE_SKIP_NO_UPDATE_ADAPTERS = 8192;

		/// DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT -> 0x00000400
		internal const int DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT = 1024;

		/// DNS_UPDATE_TRY_ALL_MASTER_SERVERS -> 0x00001000
		internal const int DNS_UPDATE_TRY_ALL_MASTER_SERVERS = 4096;

		/// DNS_WINS_FLAG_LOCAL -> (0x00010000)
		internal const int DNS_WINS_FLAG_LOCAL = 65536;

		/// DNS_WINS_FLAG_SCOPE -> (0x80000000)
		internal const int DNS_WINS_FLAG_SCOPE = -2147483648;

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_WINS_RECORD_LENGTH -> "(IpCount) (FIELD_OFFSET(DNS_WINS_DATA, WinsServers) + ((IpCount) * sizeof(IP4_ADDRESS)))"
		internal const string DNS_WINS_RECORD_LENGTH = "(IpCount) (FIELD_OFFSET(DNS_WINS_DATA, WinsServers) + ((IpCount) * sizeof(IP4_ADD" +
													 "RESS)))";

		/// Warning: Generation of Method Macros is not supported at this time
		/// DNS_WKS_RECORD_LENGTH -> "(ByteCount) (FIELD_OFFSET(DNS_WKS_DATA, BitMask) + (ByteCount))"
		internal const string DNS_WKS_RECORD_LENGTH = "(ByteCount) (FIELD_OFFSET(DNS_WKS_DATA, BitMask) + (ByteCount))";

		/// DnsAcquireContextHandle -> DnsAcquireContextHandle_W
		/// Error generating expression: Value DnsAcquireContextHandle_W is not resolved
		internal const string DnsAcquireContextHandle = "DnsAcquireContextHandle_W";

		/// DnsFreeRecordListDeep -> DnsFreeRecordList
		internal const DNS_FREE_TYPE DnsFreeRecordListDeep = DNS_FREE_TYPE.DnsFreeRecordList;

		/// DnsModifyRecordsInSet -> DnsModifyRecordsInSet_W
		/// Error generating expression: Value DnsModifyRecordsInSet_W is not resolved
		internal const string DnsModifyRecordsInSet = "DnsModifyRecordsInSet_W";

		/// Warning: Generation of Method Macros is not supported at this time
		/// DnsNameCompare -> "(n1,n2) DnsNameCompare_W( (n1),(n2) )"
		internal const string DnsNameCompare = "(n1,n2) DnsNameCompare_W( (n1),(n2) )";

		/// DnsQuery -> DnsQuery_W
		/// Error generating expression: Value DnsQuery_W is not resolved
		internal const string DnsQuery = "DnsQuery_W";

		/// DNSREC_ADDITIONAL -> (0x00000003)
		internal const int DNSREC_ADDITIONAL = 3;

		/// DNSREC_ANSWER -> (0x00000001)
		internal const int DNSREC_ANSWER = 1;

		/// DNSREC_AUTHORITY -> (0x00000002)
		internal const int DNSREC_AUTHORITY = 2;

		/// DNSREC_DELETE -> (0x00000004)
		internal const int DNSREC_DELETE = 4;

		/// DNSREC_NOEXIST -> (0x00000004)
		internal const int DNSREC_NOEXIST = 4;

		/// DNSREC_PREREQ -> (0x00000001)
		internal const int DNSREC_PREREQ = 1;

		/// DNSREC_QUESTION -> (0x00000000)
		internal const int DNSREC_QUESTION = 0;

		/// DNSREC_SECTION -> (0x00000003)
		internal const int DNSREC_SECTION = 3;

		/// DNSREC_UPDATE -> (0x00000002)
		internal const int DNSREC_UPDATE = 2;

		/// DNSREC_ZONE -> (0x00000000)
		internal const int DNSREC_ZONE = 0;

		/// Warning: Generation of Method Macros is not supported at this time
		/// DnsRecordCopy -> "(pRR) DnsRecordCopyEx( (pRR), DnsCharSetUnicode, DnsCharSetUnicode )"
		internal const string DnsRecordCopy = "(pRR) DnsRecordCopyEx( (pRR), DnsCharSetUnicode, DnsCharSetUnicode )";

		/// Warning: Generation of Method Macros is not supported at this time
		/// DnsRecordSetCopy -> "(pRR) DnsRecordSetCopyEx( (pRR), DnsCharSetUnicode, DnsCharSetUnicode )"
		internal const string DnsRecordSetCopy = "(pRR) DnsRecordSetCopyEx( (pRR), DnsCharSetUnicode, DnsCharSetUnicode )";

		/// DnsReplaceRecordSet -> DnsReplaceRecordSetW
		/// Error generating expression: Value DnsReplaceRecordSetW is not resolved
		internal const string DnsReplaceRecordSet = "DnsReplaceRecordSetW";

		/// DNSSEC_ALGORITHM_NULL -> 253
		internal const int DNSSEC_ALGORITHM_NULL = 253;

		/// DNSSEC_ALGORITHM_PRIVATE -> 254
		internal const int DNSSEC_ALGORITHM_PRIVATE = 254;

		/// DNSSEC_ALGORITHM_RSAMD5 -> 1
		internal const int DNSSEC_ALGORITHM_RSAMD5 = 1;

		/// DNSSEC_KEY_FLAG_ -> 
		/// Error generating expression: Value cannot be null.
		///Parameter name: node
		internal const string DNSSEC_KEY_FLAG_ = "";

		/// DNSSEC_KEY_FLAG_EXTEND -> 0x0008
		internal const int DNSSEC_KEY_FLAG_EXTEND = 8;

		/// DNSSEC_KEY_FLAG_FLAG10 -> 0x0400
		internal const int DNSSEC_KEY_FLAG_FLAG10 = 1024;

		/// DNSSEC_KEY_FLAG_FLAG11 -> 0x0800
		internal const int DNSSEC_KEY_FLAG_FLAG11 = 2048;

		/// DNSSEC_KEY_FLAG_FLAG2 -> 0x0004
		internal const int DNSSEC_KEY_FLAG_FLAG2 = 4;

		/// DNSSEC_KEY_FLAG_FLAG4 -> 0x0010
		internal const int DNSSEC_KEY_FLAG_FLAG4 = 16;

		/// DNSSEC_KEY_FLAG_FLAG5 -> 0x0020
		internal const int DNSSEC_KEY_FLAG_FLAG5 = 32;

		/// DNSSEC_KEY_FLAG_FLAG8 -> 0x0100
		internal const int DNSSEC_KEY_FLAG_FLAG8 = 256;

		/// DNSSEC_KEY_FLAG_FLAG9 -> 0x0200
		internal const int DNSSEC_KEY_FLAG_FLAG9 = 512;

		/// DNSSEC_KEY_FLAG_HOST -> 0x0080
		internal const int DNSSEC_KEY_FLAG_HOST = 128;

		/// DNSSEC_KEY_FLAG_NOAUTH -> 0x0001
		internal const int DNSSEC_KEY_FLAG_NOAUTH = 1;

		/// DNSSEC_KEY_FLAG_NOCONF -> 0x0002
		internal const int DNSSEC_KEY_FLAG_NOCONF = 2;

		/// DNSSEC_KEY_FLAG_NTPE3 -> 0x00c0
		internal const int DNSSEC_KEY_FLAG_NTPE3 = 192;

		/// DNSSEC_KEY_FLAG_SIG0 -> 0x0000
		internal const int DNSSEC_KEY_FLAG_SIG0 = 0;

		/// DNSSEC_KEY_FLAG_SIG1 -> 0x1000
		internal const int DNSSEC_KEY_FLAG_SIG1 = 4096;

		/// DNSSEC_KEY_FLAG_SIG10 -> 0xa000
		internal const int DNSSEC_KEY_FLAG_SIG10 = 40960;

		/// DNSSEC_KEY_FLAG_SIG11 -> 0xb000
		internal const int DNSSEC_KEY_FLAG_SIG11 = 45056;

		/// DNSSEC_KEY_FLAG_SIG12 -> 0xc000
		internal const int DNSSEC_KEY_FLAG_SIG12 = 49152;

		/// DNSSEC_KEY_FLAG_SIG13 -> 0xd000
		internal const int DNSSEC_KEY_FLAG_SIG13 = 53248;

		/// DNSSEC_KEY_FLAG_SIG14 -> 0xe000
		internal const int DNSSEC_KEY_FLAG_SIG14 = 57344;

		/// DNSSEC_KEY_FLAG_SIG15 -> 0xf000
		internal const int DNSSEC_KEY_FLAG_SIG15 = 61440;

		/// DNSSEC_KEY_FLAG_SIG2 -> 0x2000
		internal const int DNSSEC_KEY_FLAG_SIG2 = 8192;

		/// DNSSEC_KEY_FLAG_SIG3 -> 0x3000
		internal const int DNSSEC_KEY_FLAG_SIG3 = 12288;

		/// DNSSEC_KEY_FLAG_SIG4 -> 0x4000
		internal const int DNSSEC_KEY_FLAG_SIG4 = 16384;

		/// DNSSEC_KEY_FLAG_SIG5 -> 0x5000
		internal const int DNSSEC_KEY_FLAG_SIG5 = 20480;

		/// DNSSEC_KEY_FLAG_SIG6 -> 0x6000
		internal const int DNSSEC_KEY_FLAG_SIG6 = 24576;

		/// DNSSEC_KEY_FLAG_SIG7 -> 0x7000
		internal const int DNSSEC_KEY_FLAG_SIG7 = 28672;

		/// DNSSEC_KEY_FLAG_SIG8 -> 0x8000
		internal const int DNSSEC_KEY_FLAG_SIG8 = 32768;

		/// DNSSEC_KEY_FLAG_SIG9 -> 0x9000
		internal const int DNSSEC_KEY_FLAG_SIG9 = 36864;

		/// DNSSEC_KEY_FLAG_USER -> 0x0000
		internal const int DNSSEC_KEY_FLAG_USER = 0;

		/// DNSSEC_KEY_FLAG_ZONE -> 0x0040
		internal const int DNSSEC_KEY_FLAG_ZONE = 64;

		/// DNSSEC_PROTOCOL_DNSSEC -> 3
		internal const int DNSSEC_PROTOCOL_DNSSEC = 3;

		/// DNSSEC_PROTOCOL_EMAIL -> 2
		internal const int DNSSEC_PROTOCOL_EMAIL = 2;

		/// DNSSEC_PROTOCOL_IPSEC -> 4
		internal const int DNSSEC_PROTOCOL_IPSEC = 4;

		/// DNSSEC_PROTOCOL_NONE -> 0
		internal const int DNSSEC_PROTOCOL_NONE = 0;

		/// DNSSEC_PROTOCOL_TLS -> 1
		internal const int DNSSEC_PROTOCOL_TLS = 1;

		/// DnsSectionPrereq -> DnsSectionAnswer
		internal const DNS_SECTION DnsSectionPrereq = DNS_SECTION.DnsSectionAnswer;

		/// DnsSectionUpdate -> DnsSectionAuthority
		internal const DNS_SECTION DnsSectionUpdate = DNS_SECTION.DnsSectionAuthority;

		/// DnsSectionZone -> DnsSectionQuestion
		internal const DNS_SECTION DnsSectionZone = DNS_SECTION.DnsSectionQuestion;

		/// Warning: Generation of Method Macros is not supported at this time
		/// DnsValidateName -> "(p,f) DnsValidateName_W( (p), (f) )"
		internal const string DnsValidateName = "(p,f) DnsValidateName_W( (p), (f) )";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_DWORD_FLIP -> "(out,in) {                           
		///            DWORD _in = (in);       
		///            (out) = ((_in << 8) & 0x00ff0000) | 
		///                    (_in << 24)               | 
		///                    ((_in >> 8) & 0x0000ff00) | 
		///                    (_in >> 24);                
		///        }"
		internal const string INLINE_DWORD_FLIP =
			@"(out,in) {                           
            DWORD _in = (in);       
            (out) = ((_in << 8) & 0x00ff0000) | 
                    (_in << 24)               | 
                    ((_in >> 8) & 0x0000ff00) | 
                    (_in >> 24);                
        }";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_HTONL -> "(out,in) INLINE_DWORD_FLIP(out, in)"
		internal const string INLINE_HTONL = "(out,in) INLINE_DWORD_FLIP(out, in)";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_HTONS -> "(out,in) INLINE_WORD_FLIP(out, in)"
		internal const string INLINE_HTONS = "(out,in) INLINE_WORD_FLIP(out, in)";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_NTOHL -> "(out,in) INLINE_DWORD_FLIP(out, in)"
		internal const string INLINE_NTOHL = "(out,in) INLINE_DWORD_FLIP(out, in)";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_NTOHS -> "(out,in) INLINE_WORD_FLIP(out, in)"
		internal const string INLINE_NTOHS = "(out,in) INLINE_WORD_FLIP(out, in)";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_WORD_FLIP -> "(out,in) {                           
		///            WORD _in = (in);        
		///            (out) = (_in << 8) | (_in >> 8);  
		///        }"
		internal const string INLINE_WORD_FLIP = "(out,in) {                           \r\n            WORD _in = (in);        \r\n    " +
											   "        (out) = (_in << 8) | (_in >> 8);  \r\n        }";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_WRITE_FLIPPED_DWORD -> "(pout,in) INLINE_DWORD_FLIP( *((UNALIGNED DWORD *)(pout)), in )"
		internal const string INLINE_WRITE_FLIPPED_DWORD = "(pout,in) INLINE_DWORD_FLIP( *((UNALIGNED DWORD *)(pout)), in )";

		/// Warning: Generation of Method Macros is not supported at this time
		/// INLINE_WRITE_FLIPPED_WORD -> "(pout,in) INLINE_WORD_FLIP( *((UNALIGNED WORD *)(pout)), in )"
		internal const string INLINE_WRITE_FLIPPED_WORD = "(pout,in) INLINE_WORD_FLIP( *((UNALIGNED WORD *)(pout)), in )";

		/// IP4_ADDRESS_STRING_BUFFER_LENGTH -> (16)
		internal const int IP4_ADDRESS_STRING_BUFFER_LENGTH = 16;

		/// IP4_ADDRESS_STRING_LENGTH -> (15)
		internal const int IP4_ADDRESS_STRING_LENGTH = 15;

		/// IP6_ADDRESS_STRING_BUFFER_LENGTH -> (48)
		internal const int IP6_ADDRESS_STRING_BUFFER_LENGTH = 48;

		/// IP6_ADDRESS_STRING_LENGTH -> (47)
		internal const int IP6_ADDRESS_STRING_LENGTH = 47;

		/// Warning: Generation of Method Macros is not supported at this time
		/// IS_DWORD_ALIGNED -> "(p) ( !((UINT_PTR)(p) & (UINT_PTR)3) )"
		internal const string IS_DWORD_ALIGNED = "(p) ( !((UINT_PTR)(p) & (UINT_PTR)3) )";

		/// Warning: Generation of Method Macros is not supported at this time
		/// IS_QWORD_ALIGNED -> "(p) ( !((UINT_PTR)(p) & (UINT_PTR)7) )"
		internal const string IS_QWORD_ALIGNED = "(p) ( !((UINT_PTR)(p) & (UINT_PTR)7) )";

		/// Warning: Generation of Method Macros is not supported at this time
		/// IS_WORD_ALIGNED -> "(p) ( !((UINT_PTR)(p) & (UINT_PTR)1) )"
		internal const string IS_WORD_ALIGNED = "(p) ( !((UINT_PTR)(p) & (UINT_PTR)1) )";

		/// SIZEOF_IP4_ADDRESS -> (4)
		internal const int SIZEOF_IP4_ADDRESS = 4;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct IP4_ARRAY
	{
		/// DWORD->unsigned int
		internal uint AddrCount;

		/// IP4_ADDRESS[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.U4)]
		internal uint[] AddrArray;
	}

	[StructLayout(LayoutKind.Explicit)]
	internal struct IP6_ADDRESS
	{
		/// DWORD[4]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
		[FieldOffset(0)]
		internal uint[] IP6Dword;

		/// WORD[8]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.U2)]
		[FieldOffset(0)]
		internal ushort[] IP6Word;

		/// BYTE[16]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
		[FieldOffset(0)]
		internal byte[] IP6Byte;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_HEADER
	{
		/// WORD->unsigned short
		internal ushort Xid;

		/// RecursionDesired : 1
		///Truncation : 1
		///Authoritative : 1
		///Opcode : 4
		///IsResponse : 1
		///ResponseCode : 4
		///Reserved : 3
		///RecursionAvailable : 1
		internal uint bitvector1;

		/// WORD->unsigned short
		internal ushort QuestionCount;

		/// WORD->unsigned short
		internal ushort AnswerCount;

		/// WORD->unsigned short
		internal ushort NameServerCount;

		/// WORD->unsigned short
		internal ushort AdditionalCount;

		internal uint RecursionDesired { get { return (((bitvector1 & 1u))); } set { bitvector1 = (((value | bitvector1))); } }

		internal uint Truncation
		{
			get
			{
				return ((((bitvector1 & 2u)
						  / 2)));
			}
			set
			{
				bitvector1 = ((((value * 2)
								| bitvector1)));
			}
		}

		internal uint Authoritative
		{
			get
			{
				return ((((bitvector1 & 4u)
						  / 4)));
			}
			set
			{
				bitvector1 = ((((value * 4)
								| bitvector1)));
			}
		}

		internal uint Opcode
		{
			get
			{
				return ((((bitvector1 & 120u)
						  / 8)));
			}
			set
			{
				bitvector1 = ((((value * 8)
								| bitvector1)));
			}
		}

		internal uint IsResponse
		{
			get
			{
				return ((((bitvector1 & 128u)
						  / 128)));
			}
			set
			{
				bitvector1 = ((((value * 128)
								| bitvector1)));
			}
		}

		internal uint ResponseCode
		{
			get
			{
				return ((((bitvector1 & 3840u)
						  / 256)));
			}
			set
			{
				bitvector1 = ((((value * 256)
								| bitvector1)));
			}
		}

		internal uint Reserved
		{
			get
			{
				return ((((bitvector1 & 28672u)
						  / 4096)));
			}
			set
			{
				bitvector1 = ((((value * 4096)
								| bitvector1)));
			}
		}

		internal uint RecursionAvailable
		{
			get
			{
				return ((((bitvector1 & 32768u)
						  / 32768)));
			}
			set
			{
				bitvector1 = ((((value * 32768)
								| bitvector1)));
			}
		}
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_WIRE_QUESTION
	{
		/// WORD->unsigned short
		internal ushort QuestionType;

		/// WORD->unsigned short
		internal ushort QuestionClass;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_WIRE_RECORD
	{
		/// WORD->unsigned short
		internal ushort RecordType;

		/// WORD->unsigned short
		internal ushort RecordClass;

		/// DWORD->unsigned int
		internal uint TimeToLive;

		/// WORD->unsigned short
		internal ushort DataLength;
	}

	internal enum DNS_CONFIG_TYPE
	{
		DnsConfigPrimaryDomainName_W,

		DnsConfigPrimaryDomainName_A,

		DnsConfigPrimaryDomainName_UTF8,

		DnsConfigAdapterDomainName_W,

		DnsConfigAdapterDomainName_A,

		DnsConfigAdapterDomainName_UTF8,

		DnsConfigDnsServerList,

		DnsConfigSearchList,

		DnsConfigAdapterInfo,

		DnsConfigPrimaryHostNameRegistrationEnabled,

		DnsConfigAdapterHostNameRegistrationEnabled,

		DnsConfigAddressRegistrationMaxCount,

		DnsConfigHostName_W,

		DnsConfigHostName_A,

		DnsConfigHostName_UTF8,

		DnsConfigFullHostName_W,

		DnsConfigFullHostName_A,

		DnsConfigFullHostName_UTF8,
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_A_DATA
	{
		/// IP4_ADDRESS->DWORD->unsigned int
		internal uint IpAddress;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_PTR_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameHost;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_PTR_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameHost;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_SOA_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNamePrimaryServer;

		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameAdministrator;

		/// DWORD->unsigned int
		internal uint dwSerialNo;

		/// DWORD->unsigned int
		internal uint dwRefresh;

		/// DWORD->unsigned int
		internal uint dwRetry;

		/// DWORD->unsigned int
		internal uint dwExpire;

		/// DWORD->unsigned int
		internal uint dwDefaultTtl;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_SOA_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNamePrimaryServer;

		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameAdministrator;

		/// DWORD->unsigned int
		internal uint dwSerialNo;

		/// DWORD->unsigned int
		internal uint dwRefresh;

		/// DWORD->unsigned int
		internal uint dwRetry;

		/// DWORD->unsigned int
		internal uint dwExpire;

		/// DWORD->unsigned int
		internal uint dwDefaultTtl;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_MINFO_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameMailbox;

		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameErrorsMailbox;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_MINFO_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameMailbox;

		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameErrorsMailbox;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_MX_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameExchange;

		/// WORD->unsigned short
		internal ushort wPreference;

		/// WORD->unsigned short
		internal ushort Pad;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_MX_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameExchange;

		/// WORD->unsigned short
		internal ushort wPreference;

		/// WORD->unsigned short
		internal ushort Pad;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_TXT_DATA
	{
		/// DWORD->unsigned int
		internal uint dwStringCount;

		/// PWSTR[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.SysUInt)]
		internal IntPtr[] pStringArray;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_TXT_DATAA
	{
		/// DWORD->unsigned int
		internal uint dwStringCount;

		/// PSTR[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.SysUInt)]
		internal IntPtr[] pStringArray;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_NULL_DATA
	{
		/// DWORD->unsigned int
		internal uint dwByteCount;

		/// BYTE[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
		internal byte[] Data;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_WKS_DATA
	{
		/// IP4_ADDRESS->DWORD->unsigned int
		internal uint IpAddress;

		/// UCHAR->unsigned char
		internal byte chProtocol;

		/// BYTE[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
		internal byte[] BitMask;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_AAAA_DATA
	{
		/// IP6_ADDRESS->Anonymous_e9a3af23_ac09_4b64_90b9_2843dfc69d26
		internal IP6_ADDRESS Ip6Address;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_SIG_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameSigner;

		/// WORD->unsigned short
		internal ushort wTypeCovered;

		/// BYTE->unsigned char
		internal byte chAlgorithm;

		/// BYTE->unsigned char
		internal byte chLabelCount;

		/// DWORD->unsigned int
		internal uint dwOriginalTtl;

		/// DWORD->unsigned int
		internal uint dwExpiration;

		/// DWORD->unsigned int
		internal uint dwTimeSigned;

		/// WORD->unsigned short
		internal ushort wKeyTag;

		/// WORD->unsigned short
		internal ushort Pad;

		/// BYTE[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
		internal byte[] Signature;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_SIG_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameSigner;

		/// WORD->unsigned short
		internal ushort wTypeCovered;

		/// BYTE->unsigned char
		internal byte chAlgorithm;

		/// BYTE->unsigned char
		internal byte chLabelCount;

		/// DWORD->unsigned int
		internal uint dwOriginalTtl;

		/// DWORD->unsigned int
		internal uint dwExpiration;

		/// DWORD->unsigned int
		internal uint dwTimeSigned;

		/// WORD->unsigned short
		internal ushort wKeyTag;

		/// WORD->unsigned short
		internal ushort Pad;

		/// BYTE[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
		internal byte[] Signature;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_KEY_DATA
	{
		/// WORD->unsigned short
		internal ushort wFlags;

		/// BYTE->unsigned char
		internal byte chProtocol;

		/// BYTE->unsigned char
		internal byte chAlgorithm;

		/// BYTE[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
		internal byte[] Key;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_LOC_DATA
	{
		/// WORD->unsigned short
		internal ushort wVersion;

		/// WORD->unsigned short
		internal ushort wSize;

		/// WORD->unsigned short
		internal ushort wHorPrec;

		/// WORD->unsigned short
		internal ushort wVerPrec;

		/// DWORD->unsigned int
		internal uint dwLatitude;

		/// DWORD->unsigned int
		internal uint dwLongitude;

		/// DWORD->unsigned int
		internal uint dwAltitude;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_NXT_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameNext;

		/// WORD->unsigned short
		internal ushort wNumTypes;

		/// WORD[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.U2)]
		internal ushort[] wTypes;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_NXT_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameNext;

		/// WORD->unsigned short
		internal ushort wNumTypes;

		/// WORD[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.U2)]
		internal ushort[] wTypes;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_SRV_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameTarget;

		/// WORD->unsigned short
		internal ushort wPriority;

		/// WORD->unsigned short
		internal ushort wWeight;

		/// WORD->unsigned short
		internal ushort wPort;

		/// WORD->unsigned short
		internal ushort Pad;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_SRV_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameTarget;

		/// WORD->unsigned short
		internal ushort wPriority;

		/// WORD->unsigned short
		internal ushort wWeight;

		/// WORD->unsigned short
		internal ushort wPort;

		/// WORD->unsigned short
		internal ushort Pad;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_ATMA_DATA
	{
		/// BYTE->unsigned char
		internal byte AddressType;

		/// BYTE[20]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
		internal byte[] Address;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_TKEY_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameAlgorithm;

		/// PBYTE->BYTE*
		internal IntPtr pAlgorithmPacket;

		/// PBYTE->BYTE*
		internal IntPtr pKey;

		/// PBYTE->BYTE*
		internal IntPtr pOtherData;

		/// DWORD->unsigned int
		internal uint dwCreateTime;

		/// DWORD->unsigned int
		internal uint dwExpireTime;

		/// WORD->unsigned short
		internal ushort wMode;

		/// WORD->unsigned short
		internal ushort wError;

		/// WORD->unsigned short
		internal ushort wKeyLength;

		/// WORD->unsigned short
		internal ushort wOtherLength;

		/// UCHAR->unsigned char
		internal byte cAlgNameLength;

		/// BOOL->int
		internal int bPacketPointers;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_TKEY_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameAlgorithm;

		/// PBYTE->BYTE*
		internal IntPtr pAlgorithmPacket;

		/// PBYTE->BYTE*
		internal IntPtr pKey;

		/// PBYTE->BYTE*
		internal IntPtr pOtherData;

		/// DWORD->unsigned int
		internal uint dwCreateTime;

		/// DWORD->unsigned int
		internal uint dwExpireTime;

		/// WORD->unsigned short
		internal ushort wMode;

		/// WORD->unsigned short
		internal ushort wError;

		/// WORD->unsigned short
		internal ushort wKeyLength;

		/// WORD->unsigned short
		internal ushort wOtherLength;

		/// UCHAR->unsigned char
		internal byte cAlgNameLength;

		/// BOOL->int
		internal int bPacketPointers;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_TSIG_DATA
	{
		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameAlgorithm;

		/// PBYTE->BYTE*
		internal IntPtr pAlgorithmPacket;

		/// PBYTE->BYTE*
		internal IntPtr pSignature;

		/// PBYTE->BYTE*
		internal IntPtr pOtherData;

		/// LONGLONG->__int64
		internal long i64CreateTime;

		/// WORD->unsigned short
		internal ushort wFudgeTime;

		/// WORD->unsigned short
		internal ushort wOriginalXid;

		/// WORD->unsigned short
		internal ushort wError;

		/// WORD->unsigned short
		internal ushort wSigLength;

		/// WORD->unsigned short
		internal ushort wOtherLength;

		/// UCHAR->unsigned char
		internal byte cAlgNameLength;

		/// BOOL->int
		internal int bPacketPointers;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_TSIG_DATAA
	{
		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameAlgorithm;

		/// PBYTE->BYTE*
		internal IntPtr pAlgorithmPacket;

		/// PBYTE->BYTE*
		internal IntPtr pSignature;

		/// PBYTE->BYTE*
		internal IntPtr pOtherData;

		/// LONGLONG->__int64
		internal long i64CreateTime;

		/// WORD->unsigned short
		internal ushort wFudgeTime;

		/// WORD->unsigned short
		internal ushort wOriginalXid;

		/// WORD->unsigned short
		internal ushort wError;

		/// WORD->unsigned short
		internal ushort wSigLength;

		/// WORD->unsigned short
		internal ushort wOtherLength;

		/// UCHAR->unsigned char
		internal byte cAlgNameLength;

		/// BOOL->int
		internal int bPacketPointers;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_WINS_DATA
	{
		/// DWORD->unsigned int
		internal uint dwMappingFlag;

		/// DWORD->unsigned int
		internal uint dwLookupTimeout;

		/// DWORD->unsigned int
		internal uint dwCacheTimeout;

		/// DWORD->unsigned int
		internal uint cWinsServerCount;

		/// IP4_ADDRESS[1]
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.U4)]
		internal uint[] WinsServers;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_WINSR_DATA
	{
		/// DWORD->unsigned int
		internal uint dwMappingFlag;

		/// DWORD->unsigned int
		internal uint dwLookupTimeout;

		/// DWORD->unsigned int
		internal uint dwCacheTimeout;

		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pNameResultDomain;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_WINSR_DATAA
	{
		/// DWORD->unsigned int
		internal uint dwMappingFlag;

		/// DWORD->unsigned int
		internal uint dwLookupTimeout;

		/// DWORD->unsigned int
		internal uint dwCacheTimeout;

		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pNameResultDomain;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_RECORD_FLAGS
	{
		/// Section : 2
		///Delete : 1
		///CharSet : 2
		///Unused : 3
		///Reserved : 24
		internal uint bitvector1;

		internal uint Section { get { return (((bitvector1 & 3u))); } set { bitvector1 = (((value | bitvector1))); } }

		internal uint Delete
		{
			get
			{
				return ((((bitvector1 & 4u)
						  / 4)));
			}
			set
			{
				bitvector1 = ((((value * 4)
								| bitvector1)));
			}
		}

		internal uint CharSet
		{
			get
			{
				return ((((bitvector1 & 24u)
						  / 8)));
			}
			set
			{
				bitvector1 = ((((value * 8)
								| bitvector1)));
			}
		}

		internal uint Unused
		{
			get
			{
				return ((((bitvector1 & 224u)
						  / 32)));
			}
			set
			{
				bitvector1 = ((((value * 32)
								| bitvector1)));
			}
		}

		internal uint Reserved
		{
			get
			{
				return ((((bitvector1 & 4294967040u)
						  / 256)));
			}
			set
			{
				bitvector1 = ((((value * 256)
								| bitvector1)));
			}
		}
	}

	internal enum DNS_SECTION
	{
		DnsSectionQuestion,

		DnsSectionAnswer,

		DnsSectionAuthority,

		DnsSectionAddtional,
	}

	[StructLayout(LayoutKind.Explicit)]
	internal struct Anonymous_1bbc3206_9a07_4b46_8691_daaad23a7873
	{
		/// DWORD->unsigned int
		[FieldOffset(0)]
		internal uint DW;

		/// DNS_RECORD_FLAGS->_DnsRecordFlags
		[FieldOffset(0)]
		internal DNS_RECORD_FLAGS S;
	}

	[StructLayout(LayoutKind.Explicit)]
	internal struct DnsRecordData
	{
		/// DNS_A_DATA->Anonymous_73b4c25d_499f_4ac2_82cb_7a17384f7710
		[FieldOffset(0)]
		internal DNS_A_DATA A;
//
//		/// DNS_SOA_DATAW->Anonymous_182e9113_5305_4f42_8d1a_153143500fcf
//		[FieldOffset(0)]
//		internal DNS_SOA_DATA Soa;
//
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Ptr;
//
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA NS;
//
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Ns;
//
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Cname;
//
//	
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Mb;
//
//
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Md;
//
//		
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Mf;
//
//	
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Mg;
//
//
//
//		/// DNS_PTR_DATAW->Anonymous_204a4968_1da4_4d88_a979_4398001af46a
//		[FieldOffset(0)]
//		internal DNS_PTR_DATA Mr;
//
//
//		/// DNS_MINFO_DATAW->Anonymous_63ece0d9_5128_49d5_b602_8fb8179ec7d4
//		[FieldOffset(0)]
//		internal DNS_MINFO_DATA Minfo;
//
//		
//		/// DNS_MINFO_DATAW->Anonymous_63ece0d9_5128_49d5_b602_8fb8179ec7d4
//		[FieldOffset(0)]
//		internal DNS_MINFO_DATA Rp;
//
//	
//
//		/// DNS_MX_DATAW->Anonymous_1c7c267e_041d_4fe5_afc6_301d2d2bcfd8
//		[FieldOffset(0)]
//		internal DNS_MX_DATA Mx;
//
//		/// DNS_MX_DATAW->Anonymous_1c7c267e_041d_4fe5_afc6_301d2d2bcfd8
//		[FieldOffset(0)]
//		internal DNS_MX_DATA Afsdb;
//
//		/// DNS_MX_DATAW->Anonymous_1c7c267e_041d_4fe5_afc6_301d2d2bcfd8
//		[FieldOffset(0)]
//		internal DNS_MX_DATA Rt;
//
//
//		/// DNS_TXT_DATAW->Anonymous_f454be70_daf9_4e5f_ab3b_bde5360a238b
//		[FieldOffset(0)]
//		internal DNS_TXT_DATA Hinfo;
//
//
//		/// DNS_TXT_DATAW->Anonymous_f454be70_daf9_4e5f_ab3b_bde5360a238b
//		[FieldOffset(0)]
//		internal DNS_TXT_DATA Isdn;
//
//	
//		/// DNS_TXT_DATAW->Anonymous_f454be70_daf9_4e5f_ab3b_bde5360a238b
//		[FieldOffset(0)]
//		internal DNS_TXT_DATA Txt;
//
//		/// DNS_TXT_DATAW->Anonymous_f454be70_daf9_4e5f_ab3b_bde5360a238b
//		[FieldOffset(0)]
//		internal DNS_TXT_DATA X25;
//
//		/// DNS_NULL_DATA->Anonymous_ee14ac98_ae33_4bb1_be31_26a06813cded
//		[FieldOffset(0)]
//		internal DNS_NULL_DATA Null;
//
//
//		/// DNS_WKS_DATA->Anonymous_3ee3db94_03b4_4884_82a2_a61c0409d4ab
//		[FieldOffset(0)]
//		internal DNS_WKS_DATA Wks;
//
//		/// DNS_AAAA_DATA->Anonymous_cb5478e5_65dc_4f54_a054_dcadeedd9c1a
//		[FieldOffset(0)]
//		internal DNS_AAAA_DATA AAAA;
//
//	
//		/// DNS_KEY_DATA->Anonymous_732fe80a_9cb1_4c3a_a19f_55f1eebc5102
//		[FieldOffset(0)]
//		internal DNS_KEY_DATA Key;
//
//	
//
//		/// DNS_SIG_DATAW->Anonymous_581af158_fab2_4753_90e4_9e1f04ab0464
//		[FieldOffset(0)]
//		internal DNS_SIG_DATA Sig;
//
//	
//		/// DNS_ATMA_DATA->Anonymous_677e6ca5_b642_4282_a13a_9f17763cf261
//		[FieldOffset(0)]
//		internal DNS_ATMA_DATA Atma;
//
//		
//
//		/// DNS_NXT_DATAW->Anonymous_96b75e13_3ae0_42d3_8054_c4dd7c118afa
//		[FieldOffset(0)]
//		internal DNS_NXT_DATA Nxt;
//
//	
//		/// DNS_SRV_DATAW->Anonymous_8f70951b_33d6_4567_a8b5_5c000170f404
//		[FieldOffset(0)]
//		internal DNS_SRV_DATA Srv;
//
//	
//
//		/// DNS_TKEY_DATAW->Anonymous_f176598d_c248_496d_920e_cd1fdc5ade4e
//		[FieldOffset(0)]
//		internal DNS_TKEY_DATA Tkey;
//
//	
//		/// DNS_TSIG_DATAW->Anonymous_d027c041_623f_407f_ac30_85bee0f81d4a
//		[FieldOffset(0)]
//		internal DNS_TSIG_DATA Tsig;
//
//	
//
//		/// DNS_WINS_DATA->Anonymous_f69932a6_ad0f_4c1b_ab64_b35a3e48e062
//		[FieldOffset(0)]
//		internal DNS_WINS_DATA Wins;
//
//
//		/// DNS_WINSR_DATAW->Anonymous_3f0b716a_daa8_4507_86ed_f27d83454f8c
//		[FieldOffset(0)]
//		internal DNS_WINSR_DATA WinsR;
//
//	
//
//		/// DNS_WINSR_DATAW->Anonymous_3f0b716a_daa8_4507_86ed_f27d83454f8c
//		[FieldOffset(0)]
//		internal DNS_WINSR_DATA Nbstat;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_RECORD
	{
		/// _DnsRecordW*
		internal IntPtr pNext;

		/// PWSTR->WCHAR*
		[MarshalAs(UnmanagedType.LPWStr)]
		internal string pName;

		/// WORD->unsigned short
		internal QueryType wType;

		/// WORD->unsigned short
		internal ushort wDataLength;

		/// Anonymous_1bbc3206_9a07_4b46_8691_daaad23a7873
		internal Anonymous_1bbc3206_9a07_4b46_8691_daaad23a7873 Flags;

		/// DWORD->unsigned int
		internal uint dwTtl;

		/// DWORD->unsigned int
		internal uint dwReserved;
	}

	[StructLayout(LayoutKind.Explicit)]
	internal struct Anonymous_2f5c88d2_8e7f_499b_8d23_252d647f358a
	{
		/// DWORD->unsigned int
		[FieldOffset(0)]
		internal uint DW;

		/// DNS_RECORD_FLAGS->_DnsRecordFlags
		[FieldOffset(0)]
		internal DNS_RECORD_FLAGS S;
	}

	[StructLayout(LayoutKind.Explicit)]
	internal struct Anonymous_7058e6dd_72dd_42fd_8928_677e119c3cbc
	{
		/// DNS_A_DATA->Anonymous_73b4c25d_499f_4ac2_82cb_7a17384f7710
		[FieldOffset(0)]
		internal DNS_A_DATA A;

		/// DNS_SOA_DATAA->Anonymous_bfbc0ed3_a227_4f2c_a672_fef522342d70
		[FieldOffset(0)]
		internal DNS_SOA_DATAA SOA;

		/// DNS_SOA_DATAA->Anonymous_bfbc0ed3_a227_4f2c_a672_fef522342d70
		[FieldOffset(0)]
		internal DNS_SOA_DATAA Soa;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA PTR;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Ptr;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA NS;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Ns;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA CNAME;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Cname;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA MB;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Mb;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA MD;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Md;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA MF;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Mf;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA MG;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Mg;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA MR;

		/// DNS_PTR_DATAA->Anonymous_0b184200_c191_4312_8f09_aa81a79e1327
		[FieldOffset(0)]
		internal DNS_PTR_DATAA Mr;

		/// DNS_MINFO_DATAA->Anonymous_61d2760c_e3e9_450a_84f9_a65d8b25b2aa
		[FieldOffset(0)]
		internal DNS_MINFO_DATAA MINFO;

		/// DNS_MINFO_DATAA->Anonymous_61d2760c_e3e9_450a_84f9_a65d8b25b2aa
		[FieldOffset(0)]
		internal DNS_MINFO_DATAA Minfo;

		/// DNS_MINFO_DATAA->Anonymous_61d2760c_e3e9_450a_84f9_a65d8b25b2aa
		[FieldOffset(0)]
		internal DNS_MINFO_DATAA RP;

		/// DNS_MINFO_DATAA->Anonymous_61d2760c_e3e9_450a_84f9_a65d8b25b2aa
		[FieldOffset(0)]
		internal DNS_MINFO_DATAA Rp;

		/// DNS_MX_DATAA->Anonymous_7f2f3619_cdce_4fac_aa99_f9ecee985bfa
		[FieldOffset(0)]
		internal DNS_MX_DATAA MX;

		/// DNS_MX_DATAA->Anonymous_7f2f3619_cdce_4fac_aa99_f9ecee985bfa
		[FieldOffset(0)]
		internal DNS_MX_DATAA Mx;

		/// DNS_MX_DATAA->Anonymous_7f2f3619_cdce_4fac_aa99_f9ecee985bfa
		[FieldOffset(0)]
		internal DNS_MX_DATAA AFSDB;

		/// DNS_MX_DATAA->Anonymous_7f2f3619_cdce_4fac_aa99_f9ecee985bfa
		[FieldOffset(0)]
		internal DNS_MX_DATAA Afsdb;

		/// DNS_MX_DATAA->Anonymous_7f2f3619_cdce_4fac_aa99_f9ecee985bfa
		[FieldOffset(0)]
		internal DNS_MX_DATAA RT;

		/// DNS_MX_DATAA->Anonymous_7f2f3619_cdce_4fac_aa99_f9ecee985bfa
		[FieldOffset(0)]
		internal DNS_MX_DATAA Rt;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA HINFO;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA Hinfo;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA ISDN;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA Isdn;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA TXT;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA Txt;

		/// DNS_TXT_DATAA->Anonymous_4b81770b_ba46_424d_9ceb_2cb5f6cbce90
		[FieldOffset(0)]
		internal DNS_TXT_DATAA X25;

		/// DNS_NULL_DATA->Anonymous_ee14ac98_ae33_4bb1_be31_26a06813cded
		[FieldOffset(0)]
		internal DNS_NULL_DATA Null;

		/// DNS_WKS_DATA->Anonymous_3ee3db94_03b4_4884_82a2_a61c0409d4ab
		[FieldOffset(0)]
		internal DNS_WKS_DATA WKS;

		/// DNS_WKS_DATA->Anonymous_3ee3db94_03b4_4884_82a2_a61c0409d4ab
		[FieldOffset(0)]
		internal DNS_WKS_DATA Wks;

		/// DNS_AAAA_DATA->Anonymous_cb5478e5_65dc_4f54_a054_dcadeedd9c1a
		[FieldOffset(0)]
		internal DNS_AAAA_DATA AAAA;

		/// DNS_KEY_DATA->Anonymous_732fe80a_9cb1_4c3a_a19f_55f1eebc5102
		[FieldOffset(0)]
		internal DNS_KEY_DATA KEY;

		/// DNS_KEY_DATA->Anonymous_732fe80a_9cb1_4c3a_a19f_55f1eebc5102
		[FieldOffset(0)]
		internal DNS_KEY_DATA Key;

		/// DNS_SIG_DATAA->Anonymous_b25a4d41_3594_4c62_ae3e_3af2c49f129d
		[FieldOffset(0)]
		internal DNS_SIG_DATAA SIG;

		/// DNS_SIG_DATAA->Anonymous_b25a4d41_3594_4c62_ae3e_3af2c49f129d
		[FieldOffset(0)]
		internal DNS_SIG_DATAA Sig;

		/// DNS_ATMA_DATA->Anonymous_677e6ca5_b642_4282_a13a_9f17763cf261
		[FieldOffset(0)]
		internal DNS_ATMA_DATA ATMA;

		/// DNS_ATMA_DATA->Anonymous_677e6ca5_b642_4282_a13a_9f17763cf261
		[FieldOffset(0)]
		internal DNS_ATMA_DATA Atma;

		/// DNS_NXT_DATAA->Anonymous_5b1e0455_1f7c_4c4a_8730_424d4a766c6b
		[FieldOffset(0)]
		internal DNS_NXT_DATAA NXT;

		/// DNS_NXT_DATAA->Anonymous_5b1e0455_1f7c_4c4a_8730_424d4a766c6b
		[FieldOffset(0)]
		internal DNS_NXT_DATAA Nxt;

		/// DNS_SRV_DATAA->Anonymous_5f14bf77_7264_449d_9094_0595372873d9
		[FieldOffset(0)]
		internal DNS_SRV_DATAA SRV;

		/// DNS_SRV_DATAA->Anonymous_5f14bf77_7264_449d_9094_0595372873d9
		[FieldOffset(0)]
		internal DNS_SRV_DATAA Srv;

		/// DNS_TKEY_DATAA->Anonymous_3c5720ca_532c_484d_bab1_8d8c4fd0b3d8
		[FieldOffset(0)]
		internal DNS_TKEY_DATAA TKEY;

		/// DNS_TKEY_DATAA->Anonymous_3c5720ca_532c_484d_bab1_8d8c4fd0b3d8
		[FieldOffset(0)]
		internal DNS_TKEY_DATAA Tkey;

		/// DNS_TSIG_DATAA->Anonymous_5c4b2e6b_90b6_4892_9b4b_163a6cbff2d0
		[FieldOffset(0)]
		internal DNS_TSIG_DATAA TSIG;

		/// DNS_TSIG_DATAA->Anonymous_5c4b2e6b_90b6_4892_9b4b_163a6cbff2d0
		[FieldOffset(0)]
		internal DNS_TSIG_DATAA Tsig;

		/// DNS_WINS_DATA->Anonymous_f69932a6_ad0f_4c1b_ab64_b35a3e48e062
		[FieldOffset(0)]
		internal DNS_WINS_DATA WINS;

		/// DNS_WINS_DATA->Anonymous_f69932a6_ad0f_4c1b_ab64_b35a3e48e062
		[FieldOffset(0)]
		internal DNS_WINS_DATA Wins;

		/// DNS_WINSR_DATAA->Anonymous_e55b8a65_c939_4f1e_aaf4_905d4f41ce51
		[FieldOffset(0)]
		internal DNS_WINSR_DATAA WINSR;

		/// DNS_WINSR_DATAA->Anonymous_e55b8a65_c939_4f1e_aaf4_905d4f41ce51
		[FieldOffset(0)]
		internal DNS_WINSR_DATAA WinsR;

		/// DNS_WINSR_DATAA->Anonymous_e55b8a65_c939_4f1e_aaf4_905d4f41ce51
		[FieldOffset(0)]
		internal DNS_WINSR_DATAA NBSTAT;

		/// DNS_WINSR_DATAA->Anonymous_e55b8a65_c939_4f1e_aaf4_905d4f41ce51
		[FieldOffset(0)]
		internal DNS_WINSR_DATAA Nbstat;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_RECORDA
	{
		/// _DnsRecordA*
		internal IntPtr pNext;

		/// PSTR->CHAR*
		[MarshalAs(UnmanagedType.LPStr)]
		internal string pName;

		/// WORD->unsigned short
		internal ushort wType;

		/// WORD->unsigned short
		internal ushort wDataLength;

		/// Anonymous_2f5c88d2_8e7f_499b_8d23_252d647f358a
		internal Anonymous_2f5c88d2_8e7f_499b_8d23_252d647f358a Flags;

		/// DWORD->unsigned int
		internal uint dwTtl;

		/// DWORD->unsigned int
		internal uint dwReserved;

		/// Anonymous_7058e6dd_72dd_42fd_8928_677e119c3cbc
		internal Anonymous_7058e6dd_72dd_42fd_8928_677e119c3cbc Data;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct DNS_RRSET
	{
		/// PDNS_RECORD->DNS_RECORDW*
		internal IntPtr pFirstRR;

		/// PDNS_RECORD->DNS_RECORDW*
		internal IntPtr pLastRR;
	}

	internal enum DNS_CHARSET
	{
		DnsCharSetUnknown,

		DnsCharSetUnicode,

		DnsCharSetUtf8,

		DnsCharSetAnsi,
	}

	internal enum DNS_FREE_TYPE
	{
		/// DnsFreeFlat -> 0
		DnsFreeFlat = 0,

		DnsFreeRecordList,

		DnsFreeParsedMessageFields,
	}

	internal enum DNS_NAME_FORMAT
	{
		DnsNameDomain,

		DnsNameDomainLabel,

		DnsNameHostnameFull,

		DnsNameHostnameLabel,

		DnsNameWildcard,

		DnsNameSrvRecord,
	}

	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
	internal struct DNS_MESSAGE_BUFFER
	{
		/// DNS_HEADER->_DNS_HEADER
		internal DNS_HEADER MessageHead;

		/// CHAR[1]
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
		internal string MessageBody;
	}

	internal class SafeNativeMethods
	{
		/// Return Type: DNS_STATUS->LONG->int
		///Config: DNS_CONFIG_TYPE->Anonymous_31a2799a_a087_4939_830a_aa12eee366d3
		///Flag: DWORD->unsigned int
		///pwsAdapterName: PWSTR->WCHAR*
		///pReserved: PVOID->void*
		///pBuffer: PVOID->void*
		///pBufferLength: PDWORD->DWORD*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsQueryConfig")]
		internal static extern int DnsQueryConfig(DNS_CONFIG_TYPE Config, uint Flag, IntPtr pwsAdapterName, IntPtr pReserved, IntPtr pBuffer, ref uint pBufferLength);


		/// Return Type: PDNS_RECORD->DNS_RECORDW*
		///pRecord: PDNS_RECORD->DNS_RECORDW*
		///CharSetIn: DNS_CHARSET->_DNS_CHARSET
		///CharSetOut: DNS_CHARSET->_DNS_CHARSET
		[DllImport("Dnsapi.dll", EntryPoint = "DnsRecordCopyEx")]
		internal static extern IntPtr DnsRecordCopyEx(ref DNS_RECORD pRecord, DNS_CHARSET CharSetIn, DNS_CHARSET CharSetOut);


		/// Return Type: PDNS_RECORD->DNS_RECORDW*
		///pRecordSet: PDNS_RECORD->DNS_RECORDW*
		///CharSetIn: DNS_CHARSET->_DNS_CHARSET
		///CharSetOut: DNS_CHARSET->_DNS_CHARSET
		[DllImport("Dnsapi.dll", EntryPoint = "DnsRecordSetCopyEx")]
		internal static extern IntPtr DnsRecordSetCopyEx(ref DNS_RECORD pRecordSet, DNS_CHARSET CharSetIn, DNS_CHARSET CharSetOut);


		/// Return Type: BOOL->int
		///pRecord1: PDNS_RECORD->DNS_RECORDW*
		///pRecord2: PDNS_RECORD->DNS_RECORDW*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsRecordCompare")]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool DnsRecordCompare(ref DNS_RECORD pRecord1, ref DNS_RECORD pRecord2);


		/// Return Type: BOOL->int
		///pRR1: PDNS_RECORD->DNS_RECORDW*
		///pRR2: PDNS_RECORD->DNS_RECORDW*
		///ppDiff1: PDNS_RECORD*
		///ppDiff2: PDNS_RECORD*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsRecordSetCompare")]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool DnsRecordSetCompare(ref DNS_RECORD pRR1, ref DNS_RECORD pRR2, ref IntPtr ppDiff1, ref IntPtr ppDiff2);


		/// Return Type: PDNS_RECORD->DNS_RECORDW*
		///pRecordList: PDNS_RECORD->DNS_RECORDW*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsRecordSetDetach")]
		internal static extern IntPtr DnsRecordSetDetach(ref DNS_RECORD pRecordList);


		/// Return Type: void
		///pData: PVOID->void*
		///FreeType: DNS_FREE_TYPE->Anonymous_7f7d12ab_30ee_47ce_9d59_3cd9aec5e0d2
		[DllImport("Dnsapi.dll", EntryPoint = "DnsFree")]
		internal static extern void DnsFree(IntPtr pData, DNS_FREE_TYPE FreeType);


		/// Return Type: void
		///pRecordList: PDNS_RECORD->DNS_RECORDW*
		///FreeType: DNS_FREE_TYPE->Anonymous_7f7d12ab_30ee_47ce_9d59_3cd9aec5e0d2
		[DllImport("Dnsapi.dll", EntryPoint = "DnsRecordListFree")]
		internal static extern void DnsRecordListFree(ref DNS_RECORD pRecordList, DNS_FREE_TYPE FreeType);


		/// Return Type: DNS_STATUS->LONG->int
		///pszName: PCSTR->CHAR*
		///wType: WORD->unsigned short
		///Options: DWORD->unsigned int
		///aipServers: PIP4_ARRAY->_IP4_ARRAY*
		///ppQueryResults: PDNS_RECORD*
		///pReserved: PVOID*
		[DllImport("Dnsapi.dll", CharSet = CharSet.Unicode)]
		internal static extern int DnsQuery([In] [MarshalAs(UnmanagedType.LPStr)] string pszName, QueryType wType, QueryOptions Options, ref IP4_ARRAY aipServers,
											   out IntPtr ppQueryResults, out IntPtr pReserved);

		/// Return Type: DNS_STATUS->LONG->int
		///pszName: PCSTR->CHAR*
		///wType: WORD->unsigned short
		///Options: DWORD->unsigned int
		///aipServers: PIP4_ARRAY->_IP4_ARRAY*
		///ppQueryResults: PDNS_RECORD*
		///pReserved: PVOID*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsQuery_W", CharSet = CharSet.Unicode)]
		internal static extern int DnsQuery([In] [MarshalAs(UnmanagedType.LPWStr)] string pszName, QueryType wType, QueryOptions Options, IntPtr reserved,
											   out DnsQueryResultSafeHandle ppQueryResults, out IntPtr pReserved);



		/// Return Type: DNS_STATUS->LONG->int
		///CredentialFlags: DWORD->unsigned int
		///pCredentials: PVOID->void*
		///pContextHandle: PHANDLE->HANDLE*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsAcquireContextHandle_W")]
		internal static extern int DnsAcquireContextHandle_W(uint CredentialFlags, IntPtr pCredentials, ref IntPtr pContextHandle);


		/// Return Type: DNS_STATUS->LONG->int
		///CredentialFlags: DWORD->unsigned int
		///pCredentials: PVOID->void*
		///pContextHandle: PHANDLE->HANDLE*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsAcquireContextHandle_A")]
		internal static extern int DnsAcquireContextHandle_A(uint CredentialFlags, IntPtr pCredentials, ref IntPtr pContextHandle);


		/// Return Type: void
		///hContext: HANDLE->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsReleaseContextHandle")]
		internal static extern void DnsReleaseContextHandle(IntPtr hContext);


		/// Return Type: DNS_STATUS->LONG->int
		///pAddRecords: PDNS_RECORD->DNS_RECORDW*
		///pDeleteRecords: PDNS_RECORD->DNS_RECORDW*
		///Options: DWORD->unsigned int
		///hContext: HANDLE->void*
		///pServerList: PIP4_ARRAY->_IP4_ARRAY*
		///pReserved: PVOID->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsModifyRecordsInSet_W")]
		internal static extern int DnsModifyRecordsInSet_W(ref DNS_RECORD pAddRecords, ref DNS_RECORD pDeleteRecords, uint Options, IntPtr hContext,
														 ref IP4_ARRAY pServerList, IntPtr pReserved);


		/// Return Type: DNS_STATUS->LONG->int
		///pAddRecords: PDNS_RECORD->DNS_RECORDW*
		///pDeleteRecords: PDNS_RECORD->DNS_RECORDW*
		///Options: DWORD->unsigned int
		///hContext: HANDLE->void*
		///pServerList: PIP4_ARRAY->_IP4_ARRAY*
		///pReserved: PVOID->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsModifyRecordsInSet_A")]
		internal static extern int DnsModifyRecordsInSet_A(ref DNS_RECORD pAddRecords, ref DNS_RECORD pDeleteRecords, uint Options, IntPtr hContext,
														 ref IP4_ARRAY pServerList, IntPtr pReserved);


		/// Return Type: DNS_STATUS->LONG->int
		///pAddRecords: PDNS_RECORD->DNS_RECORDW*
		///pDeleteRecords: PDNS_RECORD->DNS_RECORDW*
		///Options: DWORD->unsigned int
		///hContext: HANDLE->void*
		///pServerList: PIP4_ARRAY->_IP4_ARRAY*
		///pReserved: PVOID->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsModifyRecordsInSet_UTF8")]
		internal static extern int DnsModifyRecordsInSet_UTF8(ref DNS_RECORD pAddRecords, ref DNS_RECORD pDeleteRecords, uint Options, IntPtr hContext,
															ref IP4_ARRAY pServerList, IntPtr pReserved);


		/// Return Type: DNS_STATUS->LONG->int
		///pNewSet: PDNS_RECORD->DNS_RECORDW*
		///Options: DWORD->unsigned int
		///hContext: HANDLE->void*
		///pServerList: PIP4_ARRAY->_IP4_ARRAY*
		///pReserved: PVOID->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsReplaceRecordSetW")]
		internal static extern int DnsReplaceRecordSetW(ref DNS_RECORD pNewSet, uint Options, IntPtr hContext, ref IP4_ARRAY pServerList, IntPtr pReserved);


		/// Return Type: DNS_STATUS->LONG->int
		///pNewSet: PDNS_RECORD->DNS_RECORDW*
		///Options: DWORD->unsigned int
		///hContext: HANDLE->void*
		///pServerList: PIP4_ARRAY->_IP4_ARRAY*
		///pReserved: PVOID->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsReplaceRecordSetA")]
		internal static extern int DnsReplaceRecordSetA(ref DNS_RECORD pNewSet, uint Options, IntPtr hContext, ref IP4_ARRAY pServerList, IntPtr pReserved);


		/// Return Type: DNS_STATUS->LONG->int
		///pNewSet: PDNS_RECORD->DNS_RECORDW*
		///Options: DWORD->unsigned int
		///hContext: HANDLE->void*
		///pServerList: PIP4_ARRAY->_IP4_ARRAY*
		///pReserved: PVOID->void*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsReplaceRecordSetUTF8")]
		internal static extern int DnsReplaceRecordSetUTF8(ref DNS_RECORD pNewSet, uint Options, IntPtr hContext, ref IP4_ARRAY pServerList, IntPtr pReserved);


		/// Return Type: DNS_STATUS->LONG->int
		///pszName: LPCSTR->CHAR*
		///Format: DNS_NAME_FORMAT->_DNS_NAME_FORMAT
		[DllImport("Dnsapi.dll", EntryPoint = "DnsValidateName_UTF8")]
		internal static extern int DnsValidateName_UTF8([In] [MarshalAs(UnmanagedType.LPStr)] string pszName, DNS_NAME_FORMAT Format);


		/// Return Type: DNS_STATUS->LONG->int
		///pwszName: LPCWSTR->WCHAR*
		///Format: DNS_NAME_FORMAT->_DNS_NAME_FORMAT
		[DllImport("Dnsapi.dll", EntryPoint = "DnsValidateName_W")]
		internal static extern int DnsValidateName_W([In] [MarshalAs(UnmanagedType.LPWStr)] string pwszName, DNS_NAME_FORMAT Format);


		/// Return Type: DNS_STATUS->LONG->int
		///pszName: LPCSTR->CHAR*
		///Format: DNS_NAME_FORMAT->_DNS_NAME_FORMAT
		[DllImport("Dnsapi.dll", EntryPoint = "DnsValidateName_A")]
		internal static extern int DnsValidateName_A([In] [MarshalAs(UnmanagedType.LPStr)] string pszName, DNS_NAME_FORMAT Format);


		/// Return Type: BOOL->int
		///pName1: LPSTR->CHAR*
		///pName2: LPSTR->CHAR*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsNameCompare_A")]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool DnsNameCompare_A([MarshalAs(UnmanagedType.LPStr)] StringBuilder pName1, [MarshalAs(UnmanagedType.LPStr)] StringBuilder pName2);


		/// Return Type: BOOL->int
		///pName1: LPWSTR->WCHAR*
		///pName2: LPWSTR->WCHAR*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsNameCompare_W")]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool DnsNameCompare_W([MarshalAs(UnmanagedType.LPWStr)] StringBuilder pName1, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pName2);


		/// Return Type: BOOL->int
		///pDnsBuffer: PDNS_MESSAGE_BUFFER->_DNS_MESSAGE_BUFFER*
		///pdwBufferSize: PDWORD->DWORD*
		///pszName: LPWSTR->WCHAR*
		///wType: WORD->unsigned short
		///Xid: WORD->unsigned short
		///fRecursionDesired: BOOL->int
		[DllImport("Dnsapi.dll", EntryPoint = "DnsWriteQuestionToBuffer_W")]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool DnsWriteQuestionToBuffer_W(ref DNS_MESSAGE_BUFFER pDnsBuffer, ref uint pdwBufferSize,
															 [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, ushort wType, ushort Xid,
															 [MarshalAs(UnmanagedType.Bool)] bool fRecursionDesired);


		/// Return Type: BOOL->int
		///pDnsBuffer: PDNS_MESSAGE_BUFFER->_DNS_MESSAGE_BUFFER*
		///pdwBufferSize: LPDWORD->DWORD*
		///pszName: LPSTR->CHAR*
		///wType: WORD->unsigned short
		///Xid: WORD->unsigned short
		///fRecursionDesired: BOOL->int
		[DllImport("Dnsapi.dll", EntryPoint = "DnsWriteQuestionToBuffer_UTF8")]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool DnsWriteQuestionToBuffer_UTF8(ref DNS_MESSAGE_BUFFER pDnsBuffer, ref uint pdwBufferSize,
																[MarshalAs(UnmanagedType.LPStr)] StringBuilder pszName, ushort wType, ushort Xid,
																[MarshalAs(UnmanagedType.Bool)] bool fRecursionDesired);


		/// Return Type: DNS_STATUS->LONG->int
		///pDnsBuffer: PDNS_MESSAGE_BUFFER->_DNS_MESSAGE_BUFFER*
		///wMessageLength: WORD->unsigned short
		///ppRecord: PDNS_RECORD*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsExtractRecordsFromMessage_W")]
		internal static extern int DnsExtractRecordsFromMessage_W(ref DNS_MESSAGE_BUFFER pDnsBuffer, ushort wMessageLength, ref IntPtr ppRecord);


		/// Return Type: DNS_STATUS->LONG->int
		///pDnsBuffer: PDNS_MESSAGE_BUFFER->_DNS_MESSAGE_BUFFER*
		///wMessageLength: WORD->unsigned short
		///ppRecord: PDNS_RECORD*
		[DllImport("Dnsapi.dll", EntryPoint = "DnsExtractRecordsFromMessage_UTF8")]
		internal static extern int DnsExtractRecordsFromMessage_UTF8(ref DNS_MESSAGE_BUFFER pDnsBuffer, ushort wMessageLength, ref IntPtr ppRecord);
	}
}